package community.hospital.convert;

import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @author yindingjie
 */
public class CommonConvert {
    public static <T,R> List<R> convert(List<T> list, Function<T,R> function) {
        return list.stream().map(function).collect(Collectors.toList());
    }
}
